package design.patterns.factorymode.factoryabstract.computer;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2020-06-08 16:18
 */

public class MainComputer {
    public static void main(String[] args) {
        // 通过抽象工厂的静态方法直接创建具体的工厂类
        MacProducer macProducer = (MacProducer) ComputerProducer.getInstance("mac");
        PcProducer pcProducer = (PcProducer) ComputerProducer.getInstance("pc");
        MacCpu macCpu = macProducer.getCpu();
        PcCpu pcCpu = pcProducer.getCpu();
    }
}
